home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 November: Tool Chest / Dev.CD Nov 98 TC.toast / Sample Code / Toolbox / MacCalendar 1.1b1 / MacCalendar.r < prev    next >
Encoding:
Text File  |  1997-03-20  |  3.3 KB  |  123 lines  |  [TEXT/CWIE]

  1. /*
  2.     File:        MacCalendar.r
  3.  
  4.     Contains:    Resource definitions for the control strip module.
  5.  
  6.     Written by:    Martin Minow
  7.  
  8.     Copyright:    © 1994-1997 by Apple Computer, Inc., all rights reserved.
  9.  
  10.     Change History (most recent first):
  11.  
  12.     You may incorporate this sample code into your applications without
  13.     restriction, though the sample code has been provided "AS IS" and the
  14.     responsibility for its operation is 100% yours.  However, what you are
  15.     not permitted to do is to redistribute the source as "DSC Sample Code"
  16.     after having made changes. If you're going to re-distribute the source,
  17.     we require that you make it clear in the source that the code was
  18.     descended from Apple Sample Code, but that you've made changes.
  19. */
  20.  
  21. /////////////////////////////////////////////////////////////////////////
  22.  
  23. #define REZ
  24.  
  25. /////////////////////////////////////////////////////////////////////////
  26.  
  27. // Pick up resource constants common to both control strip
  28. // module and application.
  29.  
  30. #include "MacCalendarCommon.h"
  31.  
  32. /////////////////////////////////////////////////////////////////////////
  33.  
  34. // Pick up resource constants common to both C and Rez for
  35. // the control strip module.
  36.  
  37. #include "MacCalendar.h"
  38.  
  39. /////////////////////////////////////////////////////////////////////////
  40.  
  41. // Pick up system resource types.
  42.  
  43. #include "Pict.r"
  44. #include "Types.r"
  45. #include "SysTypes.r"
  46. #include "BalloonTypes.r"
  47.  
  48. resource 'vers' (1) {
  49.     kVersionMajor, kVersionMinor, kVersionStage, kVersionRelease, verUS,
  50.     kVersionIdent,
  51.     kVersionString
  52. };
  53.  
  54. // The STRN_Info resource holds various strings resources needed
  55. // by the control strip module, including the default settings as
  56. // far as it is concerned.  Note that the application
  57. // also has a copy of these default settings, also held as
  58. // a STR# resource, but with a slightly different format, ie
  59. // the string indexes are different! -- Quinn
  60.  
  61. resource 'STR#' (STRN_Info) {
  62.     {
  63.         "MacCalendar\n\n"
  64.             "This Control Strip module displays the current month’s calendar",
  65.         kDefaultFontStr,                    /* Font name                    */
  66.         kDefaultSizeStr,                    /* Font size                    */
  67.         kDefaultFirstDayStr,                /* 1 == Sunday, 2 == Monday        */
  68.         kDefaultDayNamesStr,                /* Day name string    */
  69.     }
  70. };
  71.  
  72. /////////////////////////////////////////////////////////////////////////
  73.  
  74. // Arrow picture to signal a popup menu (actually, we don't have one). This must
  75. // be a polygon so the background color shows around the arrow itself.
  76.  
  77. resource 'PICT' (PICT_RightArrow) {
  78.     {0, 0, 8, 6}, VersionOne {
  79.         {
  80.             ClipRgn        {{0, 0, 8, 6}, $""};
  81.             FillPoly    {{0, 0, 8, 6}, {{0, 2}, {4, 6}, {8, 2}, {0, 2}}};
  82.         }
  83.     }
  84. };
  85.  
  86. /////////////////////////////////////////////////////////////////////////
  87.  
  88. // Define the bundle and Finder help.
  89.  
  90. #define ICON_Calendar        128
  91. #define FREF_Calendar        128
  92. #define BNDL_Calendar        128
  93.  
  94. type kControlStripCreator as 'STR ';
  95.  
  96. resource kControlStripCreator (0) {
  97.     "MacCalendar: " kVersionString
  98. };
  99.  
  100. resource 'BNDL' (BNDL_Calendar) {
  101.     kControlStripCreator, 0,
  102.     {
  103.         'FREF', {0, FREF_Calendar};
  104.         'ICN#', {0, ICON_Calendar};
  105.     }
  106. };
  107.  
  108. resource 'FREF' (FREF_Calendar) {
  109.     'sdev', 0, ""
  110. };
  111.  
  112. resource 'hfdr' (kHMHelpID) {
  113.     HelpMgrVersion, hmDefaultOptions, 0, 0,
  114.     {
  115.         HMStringItem    {
  116.             "MacCalendar\n\n"
  117.              "This Control Strip module draws this month’s calendar.  To use this"
  118.              " file, place it into the Control Strip folder in the System Folder"
  119.              " and restart the computer."
  120.         };
  121.     }
  122. };
  123.